<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>添加医院</title>
</head>
<body>
<div class="pd-20">
    <form action="{:U('add')}" method="post" class="form form-horizontal" id="form">
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red">*</span>标题：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" name="title"  datatype="*" nullmsg="标题不能为空" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red"></span>图片：</label>
            <div class="formControls col-10">
                <input type="file" class="input-text" name="coverFile" accept="image/*" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red"></span>点击次数：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" placeholder="请输入" name="hit">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red"></span>收藏次数：</label>
            <div class="formControls col-10">
                <input type="text" class="input-text" placeholder="请输入" name="collectnum">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red"></span>是否星标：</label>
            <div class="formControls col-10">
                <span class="select-box">
                <select class="select Validform_error" size="1" name="starflag" datatype="*" >
                    <option value="0" selected>否</option>
                    <option value="1">是</option>
                </select>
                </span>
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red"></span>内容：</label>
            <div class="formControls col-10">
                <script id="content" name="content" type="text/plain" style="width:100%;height:400px;"></script>
                </div>
                <div class="col-4"></div>
            </div>
        <div class="row cl">
        <div class="col-9 col-offset-5">
        <input class="btn btn-primary radius" type="submit" value="提交">
        </div>
        </div>
        </form>
        </div>
        <include file="Common:footer_include"/>
       </body>
  <script type="text/javascript">
          $(function () {
                        var ue = UE.getEditor('content');
            });
       function onchangeusertype(jqObj){
                    var tpye= jqObj.val();
                    var userlistcheck = $('#userlist');
                    var ajaxurl='{:U("MedicalInformations/getuserLists")}?tpye_id='+tpye;
                      userlistcheck.html('');
                    $.ajax({
                        url:ajaxurl ,
                        type: 'post',
                        enctype: 'multipart/form-data',
                        success: function (data) {
                            $.each(data, function (i, items) {
                                userlistcheck.append('<option value="'+ items.id + '" >'+ items.realname + '</option>');
                            });
                        }
                    });
                }
   </script>
</html>